from django.db import models


# Create your models here.

class Type(models.Model):
    name = models.CharField(max_length=20)


class Books(models.Model):
    name = models.CharField(max_length=20)
    price = models.IntegerField()
    eg = models.ForeignKey(Type, on_delete=models.CASCADE, related_name='eg')
